home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / change.lha / Change / source / Include / SDI_defines.h < prev    next >
C/C++ Source or Header  |  1995-12-31  |  3KB  |  109 lines

  1. // $VER: SDI_defines.h 1.12 (15.10.1995)
  2.  
  3. #ifndef SDI_DEFINES_H
  4. #define SDI_DEFINES_H
  5.  
  6. /* ============================== History =============================== */
  7.  
  8. /* Includeheader
  9.  
  10.     Name:        SDI_defines
  11.     Author:        SDI
  12.     Distribution:    PD
  13.     Description:    Standard Defines und Makros, sowie Versionsstring
  14.  
  15.  1.0    : aus ...SDI.h Files aufgebaut
  16.  1.1    : SDI_ERROR eingefügt
  17.  1.2    : INFO's verbessert
  18.  1.3    : SDI_ERROR entfernt
  19.  1.4    : INFO_ERR berichtigt
  20.  1.5    : wenn DATE nicht definiert, dann DATE == __DATE2__
  21.  1.6    : DEBUG Teile eingeführt
  22.  1.7    : DEBUG's etwas geändert
  23.  1.8    : OS_VERSION und TEST_OS eingeführt
  24.  1.9   10.08.95 : OS_VERSION verkürzt
  25.  1.10  18.08.95 : DEBUG_BREAKS ergänzt
  26.  1.11  23.09.95 : NOVERSION ergänzt
  27.  1.12  15.10.95 : jetzt STRPTR version
  28. */
  29.  
  30. /* ============== Defines für GetCharHEX und GetCharSTRING ============== */
  31.  
  32. #define PATTERN_BACK        351  // '_' bei Ausgabe
  33. #define PATTERN            '?'
  34. #define PATTERN_VORZ        92   // '\'
  35. #define BACK_MAX        256
  36.  
  37. /* ================= Makros für Zeichenkettenbearbeitung ================ */
  38.  
  39. #define isprintSDI(c)    ((c > 31 && c < 127) || c > 160)
  40. /* Zeichen 20-7E, A1-FF */
  41. #define isHEXNum(c)    ((c>47 && c<58)||(c>64 && c<71)||(c>96 && c<103))
  42. /* Zeichen 0 bis 9, a bis f und A bis F */
  43.  
  44. /* ========================== sonstige Makros =========================== */
  45.  
  46. // <pragmas/exec_lib.h>, <dos/dos.h> <exec/execbase.h>
  47.  
  48. #define CTRL_C        (SetSignal (0L,0L) & SIGBREAKF_CTRL_C)
  49. #define IS_PAR_HELP    (argc > 1 && argv[1][0] == '?')
  50. #define OS_VERSION      (SysBase->LibNode.lib_Version)
  51. #define TEST_OS(vers)   if(OS_VERSION < vers) {                   \
  52.        PrintFault(ERROR_INVALID_RESIDENT_LIBRARY, 0); exit(RETURN_FAIL); }
  53.  
  54. /* ===================== Makros für Infotextausgabe ===================== */
  55.  
  56. // <pragmas/dos_lib.h>, <dos/dos.h>
  57.  
  58. #define INFO_OK  {PutStr(NAME " : "); PutStr(Info_Head);           \
  59.         PutStr(Info_Text); exit(RETURN_FAIL);}
  60. #define INFO_ERR {PutStr(NAME " : "); PutStr(Info_Head);           \
  61.         PrintFault(ERROR_REQUIRED_ARG_MISSING,0); exit(RETURN_FAIL);}
  62.  
  63. /* ======================== Zeichendefinitionen ========================= */
  64.  
  65. #define BS   8
  66. #define ESC 27
  67.  
  68. /* ========================== Debug - Defines =========================== */
  69.  
  70. // #define DEBUG        // Standard Debugging
  71. // #define DEBUG_NO        // kein Debugging
  72. // #define DEBUG_NORMAL        // alle Standardausgaben
  73. // #define DEBUG_LOOP        // innerhalb von Schleifen
  74. // #define DEBUG_INC_FUNC    // Ausgaben der Includefunktionen
  75. // #define DEBUG_BREAKS        // für Breakpoints mit Wait
  76.  
  77. /* =========================== Versionsstring =========================== */
  78.  
  79. #ifdef NAME
  80.  
  81.  #ifndef AUTHOR
  82.   #define AUTHOR "by SDI"
  83.  #endif
  84.  
  85.  #ifndef VERSION
  86.   #define VERSION "1"
  87.  #endif
  88.  
  89.  #ifndef REVISION
  90.   #define REVISION "0"
  91.  #endif
  92.  
  93.  #ifndef DATE
  94.   #define DATE __DATE2__
  95.  #endif
  96.  
  97.  #ifndef DISTRIBUTION
  98.   #define DISTRIBUTION "(PD) "
  99.  #endif
  100.  
  101. #ifndef NOVERSION
  102.  STRPTR version = "$VER: " NAME " " VERSION "." REVISION " (" DATE ") "
  103.  DISTRIBUTION AUTHOR;
  104. #endif
  105.  
  106. #endif /* NAME */
  107. #endif /* SDI_DEFINES_H */
  108.  
  109.